ext.deps = [:]

def versions = [:]
versions.android_gradle_plugin = '${gradlePluginVersion}'
versions.kotlin = '${kotlinVersion}'
versions.constraint_layout = "2.0.0-alpha2"
versions.support_version = "28.0.0"
versions.supportX = "1.0.0"
versions.core_ktx = "1.0.0"
versions.fragment = "1.1.0-alpha05"
versions.glide = "4.8.0"
versions.retrofit = "2.4.0"
versions.retrofit_gson = "2.3.0"
versions.retrofit_scalars = "2.3.0"
versions.retrofit_rxjava2 = "2.3.0"
versions.rx_java2 = "2.2.3"
versions.rx_android = "2.1.0"
versions.rxlifecycle = "2.0.1"
versions.rxbinding_kotlin = "2.1.1"
versions.rxdownload = "2.0.0-beta4"
versions.rxCache = "1.8.3-2.x"
versions.rxCache_gson = "0.0.4"
versions.dToast = "1.1.5"
versions.zxing = "3.3.0"
versions.chuck = "1.1.0"
versions.okHttp = "3.10.0"
versions.butterknife = "8.8.1"
versions.rxPermission = "0.9.5@aar"
versions.multidex = "1.0.3"
versions.systembartint = "1.0.4"
versions.eventBus = "3.1.1"
versions.gson = "2.8.0"
versions.aRouterRuntime = "1.4.1"
versions.aRouterCompiler = "1.2.2"

ext.versions = versions

def deps = [:]

def supportX = [:]
supportX.annotations = "androidx.annotation:annotation:$versions.supportX"
supportX.app_compat = "androidx.appcompat:appcompat:$versions.supportX"
supportX.recyclerview = "androidx.recyclerview:recyclerview:$versions.supportX"
supportX.cardview = "androidx.cardview:cardview:$versions.supportX"
supportX.design = "com.google.android.material:material:$versions.supportX"
supportX.v4 = "androidx.legacy:legacy-support-v4:$versions.supportX"
supportX.core_utils = "androidx.legacy:legacy-support-core-utils:$versions.supportX"
supportX.core_ktx = "androidx.core:core-ktx:$versions.core_ktx"
supportX.fragment_runtime = "androidx.fragment:fragment:$versions.fragment"
supportX.fragment_runtime_ktx = "androidx.fragment:fragment-ktx:$versions.fragment"
supportX.fragment_testing = "androidx.fragment:fragment-testing:$versions.fragment"
deps.supportX = supportX

def support = [:]
support.annotations = "com.android.support:support-annotations:$versions.support_version"
support.cardview = "com.android.support:cardview-v7:$versions.support_version"
support.design = "com.android.support:design:$versions.support_version"
support.recyclerView = "com.android.support:recyclerview-v7:$versions.support_version"
support.v4 = "com.android.support:support-v4:$versions.support_version"
support.v7 = "com.android.support:appcompat-v7:$versions.support_version"
support.constraintLayout = "com.android.support.constraint:constraint-layout:1.1.3"
support.multidex = "com.android.support:multidex:$versions.multidex"
deps.support = support

def retrofit = [:]
retrofit.runtime = "com.squareup.retrofit2:retrofit:$versions.retrofit"
retrofit.gson = "com.squareup.retrofit2:converter-gson:$versions.retrofit_gson"
retrofit.mock = "com.squareup.retrofit2:retrofit-mock:$versions.retrofit"
retrofit.scalars = "com.squareup.retrofit2:converter-scalars:$versions.retrofit_scalars"
retrofit.rxjava2 = "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofit_rxjava2"
deps.retrofit = retrofit

def kotlin = [:]
kotlin.stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin"
kotlin.plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
deps.kotlin = kotlin

def glide = [:]
glide.runtime = "com.github.bumptech.glide:glide:$versions.glide"
glide.compiler = "com.github.bumptech.glide:compiler:$versions.glide"
deps.glide = glide

def butterknife = [:]
butterknife.runtime = "com.jakewharton:butterknife:$versions.butterknife"
butterknife.compiler = "com.jakewharton:butterknife-compiler:$versions.butterknife"
deps.butterknife = butterknife

deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"

deps.rxjava2 = "io.reactivex.rxjava2:rxjava:$versions.rx_java2"
deps.rx_android = "io.reactivex.rxjava2:rxandroid:$versions.rx_android"

def rxlifecycle = [:]
rxlifecycle.runtime = "com.trello.rxlifecycle2:rxlifecycle:$versions.rxlifecycle"
rxlifecycle.components = "com.trello.rxlifecycle2:rxlifecycle-components:$versions.rxlifecycle"
deps.rxlifecycle = rxlifecycle

def rxBinding = [:]
rxBinding.runtime = "com.jakewharton.rxbinding2:rxbinding-kotlin:$versions.rxbinding_kotlin"
rxBinding.v4 = "com.jakewharton.rxbinding2:rxbinding-support-v4:$versions.rxbinding_kotlin"
rxBinding.v7 = "com.jakewharton.rxbinding2:rxbinding-appcompat-v7:$versions.rxbinding_kotlin"
rxBinding.design = "com.jakewharton.rxbinding2:rxbinding-design:$versions.rxbinding_kotlin"
rxBinding.recyclerView = "com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:$versions.rxbinding_kotlin"
deps.rxBinding = rxBinding

def rxDownload = [:]
rxDownload.runtime = "zlc.season:rxdownload2:$versions.rxdownload"
deps.rxDownload = rxDownload

def rxCache = [:]
rxCache.runtime = "com.github.VictorAlbertos.RxCache:runtime:$versions.rxCache"
rxCache.gson = "com.github.VictorAlbertos.Jolyglot:gson:$versions.rxCache_gson"
deps.rxCache = rxCache

deps.dToast = "com.github.Dovar66:DToast:$versions.dToast"

def zxing = [:]
zxing.core = "com.google.zxing:core:$versions.zxing"
zxing.android = "com.google.zxing:android-integration:$versions.zxing"
deps.zxing = zxing

deps.chuck = "com.readystatesoftware.chuck:library:$versions.chuck"

deps.okHttp = "com.squareup.okhttp3:okhttp:$versions.okHttp"
deps.rxPermission = "com.tbruyelle.rxpermissions2:rxpermissions:$versions.rxPermission"
deps.systembartint = "com.readystatesoftware.systembartint:systembartint:$versions.systembartint"
deps.gson = "com.google.code.gson:gson:$versions.gson"

def eventBus = [:]
eventBus.runtime = "org.greenrobot:eventbus:$versions.eventBus"
eventBus.compiler = "org.greenrobot:eventbus-annotation-processor:$versions.eventBus"
deps.eventBus = eventBus

def fastLib = [:]
fastLib.common_base = "io.library.android:common-base:+"
fastLib.android_pay = "io.library.android:android-pay:+"
fastLib.baidu_location = "io.library.android:location-baidu:+"
fastLib.baidu_system = "io.library.android:location-system:+"
fastLib.pull_to_refresh = "io.library.android:pull-to-refresh:+"
fastLib.smart_rv_adapter = "io.library.android:smart-rv-adapter:+"
fastLib.network_listen = "io.library.android:net-listen:+"
fastLib.image_crop = "io.library.android:android-crop:+"
fastLib.bottombar = "io.library.android:bottom-bar:+"
fastLib.viewpager_indicator = "io.library.android:viewpager-indicator:+"
fastLib.ui_sneaker = "io.library.android:ui-sneaker:+"
fastLib.domain_mapping = "io.library.android:domain-mapping:+"
fastLib.loading_retry = "io.library.android:loading-retry:+"
deps.fastLib = fastLib

def aRouter = [:]
aRouter.runtime = "com.alibaba:arouter-api:$versions.aRouterRuntime"
aRouter.compiler = "com.alibaba:arouter-compiler:$versions.aRouterCompiler"
deps.aRouter = aRouter

ext.deps = deps

def build_versions = [:]
build_versions.min_sdk = 16
build_versions.target_sdk = 28
build_versions.build_tools = "28.0.3"
build_versions.compile_version = 28
ext.build_versions = build_versions

ext.deps = deps

def addRepos(RepositoryHandler handler) {
    handler.maven { url "https://maven.google.com" }
    handler.google()
    handler.jcenter()
    handler.maven { url 'https://jitpack.io' }
    handler.maven { url 'https://dl.bintray.com/sfe2014/maven' }
}
ext.addRepos = this.&addRepos
